using App.EntityFramework.Seed;
using EntityFramework.DynamicFilters;
using System.Data.Entity.Migrations;

namespace App.EntityFramework
{
    internal sealed class Configuration : DbMigrationsConfiguration<WebPlusDbContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = true;
            //AutomaticMigrationDataLossAllowed = true;
        }

        protected override void Seed(WebPlusDbContext context)
        {
            context.DisableAllFilters();

            new InitialDbBuilder(context).Create();

            context.SaveChanges();
        }
    }
}
